package com.administration.pojo;

//分页类
public class PageInfo {

    //当前页数
    private Integer page;

    //每页显示的数量
    private Integer limit;

    //起始行
    private Integer start;

    //结束行
    private Integer end;

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getStart() {
        return start = (page - 1) * limit;
    }

    public void setStart(Integer start) {
        this.start = start;
    }

    public Integer getEnd() {
        return end = page * limit;
    }

    public void setEnd(Integer end) {
        this.end = end;
    }

    public PageInfo(Integer page, Integer limit, Integer start, Integer end) {
        this.page = page;
        this.limit = limit;
        this.start = start;
        this.end = end;
    }
}

